package gov.dhs.cis.soa.data;

import gov.dhs.cis.soa.Constants.EntityType;

public class BusinessProcess extends AbstractSOAData {
	public static final String STEREO_TYPE = "BusinessProcess";

	public int id;
	public String function;
	public String serialNum;
	public String name;

	@Override
	public String toString() {
		return "BusinessProcess [id=" + id + ", " + serialNum + " " + name + " - " + function + "]";
	}
	
	@Override
	public boolean equals(Object obj) {
		if (obj == null)
			return false;
		if (getClass() != obj.getClass())
			return false;
		BusinessProcess other = (BusinessProcess) obj;
		if (id == other.id && name.equalsIgnoreCase(other.name))
			return true;
		return false;
	}	
	
//	public static String getUMLId(int entityId) {
//		return EntityType.BPROC + "_" + entityId;
//	}

	@Override
	public long getId() {
		return id;
	}
	@Override
	public String getHashableId() {
		return name;
	}

	@Override
	public EntityType getUMLType() {
		return EntityType.BPROC;
	}
}
